<?php

date_default_timezone_set('PRC');

define('BASE_PATH', __DIR__);
include __DIR__ . '/function.php';
C(include(__DIR__ . '/../app/Common/Conf/database.php'));
C('dsn', get_pdo_dsn());

spl_autoload_register(function($name){
    list($path, $model) = explode('\\', $name);

    if ($path != 'Lib')  {
        return false;
    }

    $file = BASE_PATH . '/lib/' . $model.'.class.php';

    if (!file_exists($file)) {
        return false;
    }

    include_once $file;

    return true;
});
